<?php
// This is the login API call used to login a user to the mobile app. 
// uncomment for debugging
require '../../../config/standard/config.php';
include '../../RestRequest.php';
include '../../RestUtils.php';
require '../../MobileConfig.php';
require '../../include/functions.php';
 
  
$data = RestUtils::processRequest();

switch($data->getMethod())
{
     
    case 'get':	
      $requestVars = $data->getRequestVars();
        
      $response =  addRoles($con, $db_name, $requestVars,$sessionEnabled);       
     
            // Do Get
        RestUtils::sendResponse(200,$response,'application/json');
    break;
    case 'post':
        $response = registerCall($data);

        // Do Get
        RestUtils::sendResponse(200, $response,'application/json');
       //RestUtils::sendResponse(200, $array['username'],'application/json');

    break; 
}

?>